#!/bin/bash

for i in $(seq 1 38); do
iprint=$(printf '%02d' $i)
if [ ! -d ~/holylfs04/cesm_output/ctlnudge$iprint/atm ]; then
CASEROOT=~/cesm_caseroot/ens/ctlnudge$iprint
cd ~/cesm_caseroot/ens/ctlnudge$iprint
./cesm_setup -clean
./cesm_setup
#./xmlchange -file env_build.xml -id BUILD_COMPLETE -val TRUE
./xmlchange -file env_run.xml -id CONTINUE_RUN -val FALSE 
sed -i '13d' ctlnudge$iprint.run
./ctlnudge$iprint.clean_build
./ctlnudge$iprint.build
./ctlnudge$iprint.submit
fi
done





























































































































































































































































































































































































































































































































































































































































































